package shuai7boy.vip.common;


public enum DateEnum {

	YEAR("year"), SEASON("season"), MONTH("month"), WEEK("week"), DAY("day"), HOUR("hour");
	public final String name;
	
    private DateEnum(String name) {
		this.name=name;
	}
    
    /**
     * 根据属性name获取对应DateEnum对象
     * @param name
     * @return
     */
    public static DateEnum valueOfName(String name) {
    	for(DateEnum date:values()) {
    		if(date.name.equals(name)) {
    			return date;
    		}
    	}
    	
    	return null;
    }
	
	
}


